package com.park.service.impl.article;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.park.client.model.article.ArticleModel;
import com.park.client.model.article.ArticleCollectModel;
import com.park.client.service.article.ArticleCollectService;
import com.park.common.util.PageData;
import com.park.dao.article.ArticleCollectMapper;
import com.park.service.impl.base.BaseServiceImpl;

@Service("collectService")
public class ArticleCollectServiceImpl extends BaseServiceImpl<ArticleCollectModel> implements ArticleCollectService {
	
	@Autowired
	private ArticleCollectMapper articleCollectMapper;

	@Override
	public boolean insert(ArticleCollectModel collect) {
		return articleCollectMapper.insert(collect)==1 ;
	}
	
	@Override
	public boolean deleteById(Long id) {
			return articleCollectMapper.deleteByPrimaryKey(id) == 1;
	}
	
	@Override
	public ArticleCollectModel selectIsExists(ArticleCollectModel record) {
		return articleCollectMapper.selectIsExists(record);
	}

	@Override
	public List<ArticleModel> selectCollectPagination(ArticleCollectModel t) {
		return articleCollectMapper.selectCollectPagination(t);
	}

	@Override
	public Integer selectCollectTotal(ArticleCollectModel t) {
		return articleCollectMapper.selectCollectTotal(t);
	}

	@Override
	public PageData<ArticleCollectModel> queryPageData(ArticleCollectModel articleCollect) {
		PageData<ArticleCollectModel> pageData = new PageData<>();
		return pageData;
	}

	@Override
	public List<ArticleCollectModel> list(Long id) {
		return articleCollectMapper.list(id);
	}

}
